home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19951130-19960209 / 000097_news@columbia.edu_Thu Dec 14 16:00:21 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  8KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA16424
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun>); Thu, 14 Dec 1995 11:00:28 -0500
  3. Received: (from news@localhost) by apakabar.cc.columbia.edu (8.6.12/8.6.12) id LAA19694 for kermit.misc@watsun; Thu, 14 Dec 1995 11:00:26 -0500
  4. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  5. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  6. Newsgroups: comp.protocols.kermit.misc
  7. Subject: Re: Backspace don't work?
  8. Date: 14 Dec 1995 16:00:21 GMT
  9. Organization: Columbia University
  10. Lines: 143
  11. Message-Id: <4aphml$j73@apakabar.cc.columbia.edu>
  12. References: <4aeic5$pf1@mercury.IntNet.net>
  13. Nntp-Posting-Host: watsun.cc.columbia.edu
  14. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. In article <4aeic5$pf1@mercury.IntNet.net>,
  17. Jeff Tomich <jtomich@news.IntNet.net> wrote:
  18. >When I'm at my unix shell prompt the backspace doesn't work, although it 
  19. >works fine when I'm in my mail reader, etc...
  20. >
  21. From the Kermit FAQ:
  22.  
  23.   http://www.columbia.edu/kermit/faq.html
  24.   ftp://kermit.columbia.edu/kermit/faq.txt
  25.  
  26. 5 MY BACKSPACE KEY DOESN'T WORK!
  27.  
  28. From: fdc@columbia.edu (Frank da Cruz)
  29. Newsgroups: comp.protocols.kermit.misc
  30. Subject: Re: [?] Backspace key says, "^?"
  31. Date: 7 Jan 1995 21:26:44 GMT
  32. Organization: Columbia University
  33. Lines: 122
  34.  
  35. In article <D201pG.DMB@indirect.com>,
  36. Jim Monty <monty@indirect.com> wrote:
  37. > DISCLAIMER: I've looked for the answer to the following question in
  38. > _Using MS-DOS Kermit_ and in the documentation included with MS-DOS
  39. > Kermit 3.13.  I either couldn't find the answer or didn't understand
  40. > it if I did.
  41. >
  42.  
  43. Thank you for consulting the documentation.
  44.  
  45. > I'm using MS-DOS Kermit 3.13 on an i80386SX machine running MS-DOS
  46. > 6.0, using a 14,400 bps Zoom VFP V.32bis modem.  Kermit is set for
  47. > VT220 terminal emulation and is using the Latin1 character set and
  48. > code page CP437.  I've not mucked with much in the initialization
  49. > files, so you may assume that any other parameters are still set to
  50. > the "factory" defaults.
  51. >
  52. > Alas, the question: In some online environments, my backspace key
  53. > behaves as one would expect it to.  In others, hitting the backspace
  54. > key results in either (1) nothing happening, or (2) the characters
  55. > "^?"  appearing on the screen.  I can, however, use Ctrl-H in these
  56. > situations.  In these exact same online environments (e.g., vi
  57. > insert mode when connected to my dial-up UNIX shell account) under
  58. > analagous circumstances, the other terminal emulator that I use,
  59. > Telemate Version 3.12, does not behave this way.  The backspace key
  60. > functions as a destructive backspace.
  61. >
  62. > I presume that the change I need to make to my MS-DOS Kermit
  63. > configuration is a simple one, but I can't figure it out.  And I've
  64. > never really wanted to bother to spend a lot of time trying to
  65. > figure it out myself.  (I want the magic straight from the wizards'
  66. > minds.)  Thanks, in advance, for taking the time to help me.
  67. >
  68. > Jim Monty, Kermit Cheerleader at Arthur Andersen LLP
  69. >
  70.  
  71. Well, Jim, I think it's finally time to classify this as a Frequently Asked
  72. Question and add it to the FAQ (kermit.columbia.edu:kermit/FAQ.TXT).
  73.  
  74. As you have discovered, different hosts and applications use different
  75. characters (or sequences) for destructive backspace.  The terminal emulator,
  76. Kermit or otherwise (including Telemate -- if its backspace key works for you
  77. in all circumstances, I think that's just a stroke of luck), has no way of
  78. knowing what host or application you are using, and therefore no way of knowing
  79. what to send when you press the Backspace key.
  80.  
  81. Of course, Kermit's Backspace key must send *something* "out of the box", so it
  82. uses one of the several most likely destructive backspace values, and in fact
  83. the one that is defined in ASCII to be destructive backspace, namely Rubout,
  84. also known as Delete or DEL, character number 127, which sometimes is displayed
  85. as "^?".  Lest anyone believe this is a frivolous choice, I quote from American
  86. National Standard X3.4-1977, Section 5.1, Control Characters:
  87.  
  88.     0/8 BS (Backspace).  A one-active-position format effector that moves
  89.     the position backward on the same line.
  90.  
  91.     7/15 (DEL). A character used primarily to erase or obliterate an
  92.     erroneous or unwanted character...
  93.  
  94. In cases where the default does not work, Kermit lets you redefine the
  95. Backspace key (or any other key) to send whatever you want it to send (or to
  96. take any other actions) with the SET KEY command.
  97.  
  98. The SET KEY command has two operands: a unique identifier for a key or key
  99. combination, called a scan code, and the value or action to be assigned to the
  100. key.  Scan codes are written with a preceding backslash (\).  The scan code for
  101. the Backspace key is \270.  The default definition for this key is \127,
  102. meaning the character whose numeric value is 127, i.e. DEL.
  103.  
  104. You can find out a key's scan code by consulting Table I-9 in the manual (pages
  105. 285-288), or by giving the SHOW KEY command to Kermit and then pressing the
  106. desired key or key combination.
  107.  
  108. Now, as you have discovered, some applications use Ctrl-H -- ASCII BS
  109. (Backspace) -- for destructive backspace.  Consulting the ASCII table on page
  110. 275, you see that the ASCII code for BS is 8.  So to make PC's Backspace key
  111. send BS instead of DEL, give this command:
  112.  
  113.   SET KEY \270 \8
  114.  
  115. If you use Kermit only to connect to hosts and services that use BS for
  116. destructive backspace, then you can put this command in your MSCUSTOM.INI file,
  117. and it will take effect automatically every time you start Kermit.
  118.  
  119. But some people (like yourself) switch between different hosts and/or services
  120. that expect different characters or sequences for destructive backspace.  You
  121. can, of course, give Kermit the appropriate command every time you switch from
  122. one to another:
  123.  
  124.   SET KEY \270 \8    ; Backspace sends BS
  125.  
  126. or:
  127.  
  128.   SET KEY \270 \127  ; Backspace sends DEL
  129.  
  130. or you can use the macros that are already defined in MSKERMIT.INI for this.
  131. In version 3.14, for example, we have macros with names like VAX and IBM.  The
  132. VAX macro sets things up (including the Backspace key) for communicating with
  133. VAXes and VAX-like systems, and that means, among other things, setting the
  134. Backspace key to send DEL.  The IBM macro, on the other hand, is used for
  135. communicating with IBM mainframes in linemode, where BS is used.
  136.  
  137. You can use these macros as they are, or you can write your own macros based
  138. upon them and add them to your MSCUSTOM.INI file.  To use a macro, just type
  139. its name at the MS-Kermit> prompt.
  140.  
  141. Suppose, for example, you normally access two different systems: a BBS (which
  142. uses 8-bit characters, ANSI terminal emulation, and BS) and a UNIX system
  143. (which uses 7-bit characters, VT220 emulation, and DEL), and these items need
  144. to be changed when you switch between the two.  You could write two macros such
  145. as these:
  146.  
  147.   define bbs set term byte 8, set term type ANSI, set key \270 \8
  148.   define unix set term byte 7, set term type vt220, set key \270 \127
  149.  
  150. And then each time you want to use the BBS, you just type "bbs" at the
  151. MS-Kermit> prompt, and each time you want to access the UNIX system, you type
  152. "unix".
  153.  
  154. Of course, you could take this process even further, and turn the BBS and UNIX
  155. macros into complete connection-establishment and login scripts, following the
  156. directions in Chapter 14 of the manual, on script programming.
  157.  
  158. - Frank